if lib and not lib.GetIndex then


function lib:GetIndex(list, text)
	for i, v in ipairs(list) do
		if v == text then
			return i
		end
	end
end


function lib:clone(data, def, types)
	if def then
		def = self:clone(def)
	else
		def = {}
	end
	
	if type(data) == "table" then
		local t
		
		for k, v in pairs(data) do
			t = type(v)
			
			if not types
				or types[t] == nil and types.default
				or types[t]
			then
				def[k] = v
			end
		end
		
		return def
	elseif type(data) == "nil" then
		return def
	end
	
	return data
end


end -- of file
